export var mapStateToProps = function(state) {
	// console.log(state);
	return {
		cart: state
	}
}
export var mapDispatchToProps = function(dispatch) {
	return {
			addcart:(info)=>{console.log('加入购物车');dispatch({type:'加入购物车',payload:info})},
			// addNum:(index)=>{console.log("数量加");dispatch({type:'数量加',payload:index})},
			addNum:(index)=>{console.log("数量加一");dispatch({type:'加1',payload:index})},
			cutNum:(index)=>{console.log("数量减一");dispatch({type:'减1',payload:index})}
			
		}
}
